(deftemplate PC
    (slot client)
    (slot temperatura);mare=>defectarea memoriei
    (slot lentila-citire);prafuita-> defectarea unitatii optice
    (slot virusi);=>defectarea HDD
    )
(assert (PC(client 1)(temperatura mare)(lentila-citire OK)(virusi nu)))
(assert (PC(client 2)(temperatura OK)(lentila-citire prafuita)(virusi nu)))
(assert (PC(client 3)(temperatura OK)(lentila-citire OK)(virusi da)))
(facts)
(run)


(defrule r1
    (PC (client ?n))
    (PC(client ?n)(temperatura mare))
=>
	(printout t "Calculatorului clientului " ?n " i s-a defectat memoria. " crlf)
    )

(run)
(defrule r2
    (PC (client ?n))
    (PC(client ?n)(lentila-citire prafuita))
=>
	(printout t "Calculatorului clientului " ?n " i s-a defectat unitatea optica. " crlf)
    )

(run)
(defrule r3
    (PC (client ?n))
    (PC(client ?n)(virusi da))
=>
	(printout t "Calculatorului clientului " ?n " i s-a defectat HDD. " crlf)
    )

(run)